<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>管理系统</title>
		<link rel="stylesheet" type="text/css" href="../ext/ext-all.css" />
		<script type="text/javascript" src="../ext/ext-base.js"></script>
		<script type="text/javascript" src="../ext/ext-all.js"></script>
		<style type="text/css">
.settings {
	background: url(../img/menu.png) left top no-repeat !important;
}
</style>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../images/s.gif';
</script>
	</head>
	<body>
		<div id="loading-mask" style=""></div>
		<div id="loading">
			<div class="loading-indicator">
			</div>
			<script type="text/javascript">
			//生成标签页
var tab = new Ext.TabPanel({

			region:'center',
			deferredRender:false,
			activeTab:0,
			resizeTabs:true, // turn on tab resizing
			minTabWidth: 115,
			tabWidth:135,
			enableTabScroll:true
		});

Ext.onReady(function(){
   //layout
   var viewport = new Ext.Viewport({
		layout:'border',
		items:[

			new Ext.BoxComponent({
				region:'north',
				layout:'border',
				el: 'north1',
				height:50,
				items:[
				 new Ext.Button({
				 text:'确定'
				 })

				]
			}),new Ext.BoxComponent({
				region:'south',
				el: 'south',
				height:25
			}),{

			region:'west',
			id:'west-panel',
			split:true,
			width: 200,
			minSize: 175,
			maxSize: 400,
			margins:'0 0 0 0',
			layout:'accordion',
			title:'短信管理系统',
			collapsible :true,
			layoutConfig:{
				animate:true
				},
		    items: [
			    {
					title:'用户管理',
					border:false,
					iconCls:'settings',
					html:'<div id="tree4" style="overflow:auto;width:100%;height:100%"></div>'
			    },{
					title:'短信管理',
					border:false,
					iconCls:'settings',
					html:'<div id="tree5" style="overflow:auto;width:100%;height:100%"></div>'
			    },{
					title:'系统管理',
					border:false,
					iconCls:'settings',
					html:'<div id="tree6" style="overflow:auto;width:100%;height:100%"></div>'
			    }
			    ]
			},
	        tab//初始标签页
		 ]
	});







//------------------用户管理---------------
	var root4=new Ext.tree.TreeNode({
		    id:"root4",
		    text:"树的根"
		});

	var root4_1=new Ext.tree.TreeNode({
		id:'root4_1',
		icon:'../img/im2.png',
		text:'开户',
		listeners:{
        'click':function(node, event) {
            event.stopEvent();
            var n = tab.getComponent(node.id);
            if (!n) { //判断是否已经打开该面板
                 n = tab.add({
                    'id':node.id,
                    'title':node.text,
                     closable:true,  //通过html载入目标页
                     html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="userregdit.jsp"></iframe>'
                 });
             }
             tab.setActiveTab(n);
         }
		}
	});

	var root4_5=new Ext.tree.TreeNode({
		id:'root4_5',
		icon:'../img/im2.png',
		text:'用户列表',
		listeners:{
        'click':function(node, event) {
            event.stopEvent();
            var n = tab.getComponent(node.id);
            if (!n) { //判断是否已经打开该面板
                 n = tab.add({
                    'id':node.id,
                    'title':node.text,
                     closable:true,  //通过html载入目标页
                     html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="usereditor.jsp"></iframe>'
                 });
             }
             tab.setActiveTab(n);
         }
		}
	});

    var root4_2=new Ext.tree.TreeNode({
		id:'root4_2',
		icon:'../img/im2.png',
		text:'业务员列表',
		    listeners:{
        'click':function(node, event) {
            event.stopEvent();
            var n = tab.getComponent(node.id);
            if (!n) { //判断是否已经打开该面板
                 n = tab.add({
                    'id':node.id,
                    'title':node.text,
                     closable:true,  //通过html载入目标页
                     html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="operatorlist.jsp"></iframe>'
                 });



             }
             tab.setActiveTab(n);
/*if(document.all)
{
        window.frames["iframe_"+tab.getActiveTab().id].location.reload(true);
}
else
{
        document.getElementById("iframe_"+tab.getActiveTab().id).contentWindow.location.reload(true);
}*/
         }
		}
	});

	    var root4_3=new Ext.tree.TreeNode({
		id:'root4_3',
		icon:'../img/im2.png',
		text:'注册业务员',
		    listeners:{
        'click':function(node, event) {
            event.stopEvent();
            var n = tab.getComponent(node.id);
            if (!n) { //判断是否已经打开该面板
                 n = tab.add({
                    'id':node.id,
                    'title':node.text,
                     closable:true,  //通过html载入目标页
                     html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="operatorregdit.jsp"></iframe>'
                 });
             }
             tab.setActiveTab(n);
         }
		}
	});

		var root4_4=new Ext.tree.TreeNode({
		id:'root4_4',
		icon:'../img/im2.png',
		text:'业务员授权',
		    listeners:{
        'click':function(node, event) {
            event.stopEvent();
            var n = tab.getComponent(node.id);
            if (!n) { //判断是否已经打开该面板
                 n = tab.add({
                    'id':node.id,
                    'title':node.text,
                     closable:true,  //通过html载入目标页
                     html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="operatorassign.jsp"></iframe>'
                 });
             }
             tab.setActiveTab(n);
         }
		}
	});

	root4.appendChild(root4_1);
	root4.appendChild(root4_5);
	root4.appendChild(root4_3);
	root4.appendChild(root4_4);
	root4.appendChild(root4_2);


		var tree4=new Ext.tree.TreePanel({
		renderTo:"tree4",
		root:root4,    //对应 根节点
		animate:true,
		enableDD:false,
		border:false,
		rootVisible:false,
		containerScroll: true
	});
//----------------------------------------------

//----------短信管理---------------------------
		var root5=new Ext.tree.TreeNode({
		    id:"root4",
		    text:"树的根"
		});

	var root5_1=new Ext.tree.TreeNode({
		id:'root5_1',
		icon:'../img/im2.png',
		text:'发送监控',
		listeners:{
        'click':function(node, event) {
            event.stopEvent();
            var n = tab.getComponent(node.id);
            if (!n) { //判断是否已经打开该面板
                 n = tab.add({
                    'id':node.id,
                    'title':node.text,
                     closable:true,  //通过html载入目标页
                     html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="messagestatu.jsp"></iframe>'
                 });
             }
             tab.setActiveTab(n);
         }
		}
	});

    var root5_2=new Ext.tree.TreeNode({
		id:'root5_2',
		icon:'../img/im2.png',
		text:'信息管理',
		    listeners:{
        'click':function(node, event) {
            event.stopEvent();
            var n = tab.getComponent(node.id);
            if (!n) { //判断是否已经打开该面板
                 n = tab.add({
                    'id':node.id,
                    'title':node.text,
                     closable:true,  //通过html载入目标页
                     html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="messagemanage.jsp"></iframe>'
                 });
             }
             tab.setActiveTab(n);
         }
		}
	});

	root5.appendChild(root5_1);
	root5.appendChild(root5_2);

		var tree5=new Ext.tree.TreePanel({
		renderTo:"tree5",
		root:root5,    //对应 根节点
		animate:true,
		enableDD:false,
		border:false,
		rootVisible:false,
		containerScroll: true
	});

//----------系统管理---------------------------
var root6=new Ext.tree.TreeNode({
		    id:"root4",
		    text:"树的根"
		});

	var root6_1=new Ext.tree.TreeNode({
		id:'root6_1',
		icon:'../img/im2.png',
		text:'系统管理菜单一',
		listeners:{
        'click':function(node, event) {
            event.stopEvent();
            var n = tab.getComponent(node.id);
            if (!n) { //判断是否已经打开该面板
                 n = tab.add({
                    'id':node.id,
                    'title':node.text,
                     closable:true,  //通过html载入目标页
                     html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="system.jsp"></iframe>'
                 });
             }
             tab.setActiveTab(n);
         }
		}
	});

    var root6_2=new Ext.tree.TreeNode({
		id:'root6_2',
		icon:'../img/im2.png',
		text:'系统管理菜单二',
		    listeners:{
        'click':function(node, event) {
            event.stopEvent();
            var n = tab.getComponent(node.id);
            if (!n) { //判断是否已经打开该面板
                 n = tab.add({
                    'id':node.id,
                    'title':node.text,
                     closable:true,  //通过html载入目标页
                     html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="test.html"></iframe>'
                 });
             }
             tab.setActiveTab(n);
         }
		}
	});

	root6.appendChild(root6_1);
	//root6.appendChild(root6_2);

		var tree6=new Ext.tree.TreePanel({
		renderTo:"tree6",
		root:root6,    //对应 根节点
		animate:true,
		enableDD:false,
		border:false,
		rootVisible:false,
		containerScroll: true
	});
});
			</script>
			<div id="north1">
				<p class="api-title">
					<b>飞网短信业务管理系统</b>
				</p>
				<div align="right"><a href='../ajaxjsp/logout.jsp'>退出</a></div>
			</div>
			<div id="west">
			</div>
			<div id="south">
				<div
					style="float: left; margin: 5px; font: normal 12px tahoma, arial, sans-serif, 宋体;">
					Power By: lrf & lm
					<span style="color: blue">管理系统</span> &nbsp;
				</div>
				<div
					style="float: right; margin: 5px; font: normal 12px tahoma, arial, sans-serif, 宋体;">
					版权所有：飞网短信业务管理系统
				</div>
			</div>

		</div>
	</body>
</html>
